Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Cameras

QuickDraw 3D provides a number of general routines for managing cameras of any kind.

Q3Camera_GetType

You can use the Q3Camera_GetType function to get type of a camera.

TQ3ObjectType Q3Camera_GetType (TQ3CameraObject camera);
camera
A camera object.

DESCRIPTION

The Q3Camera_GetType function returns, as its function result, the type of the camera specified by the camera parameter. The types of camera currently supported by QuickDraw 3D are defined by these constants:

kQ3CameraTypeOrthographic
kQ3CameraTypeViewAngleAspect
kQ3CameraTypeViewPlane

If Q3Camera_GetType cannot determine the type of the specified camera, it returns kQ3ObjectTypeInvalid .

Q3Camera_GetData

You can use the Q3Camera_GetData function to get the basic data associated with a camera.

TQ3Status Q3Camera_GetData (
                     TQ3CameraObject camera,
                     TQ3CameraData *cameraData);
camera
A camera object.
cameraData
On exit, a pointer to a camera data structure.

DESCRIPTION

The Q3Camera_GetData function returns, through the cameraData parameter, basic information about the camera specified by the camera parameter. See "Camera Data Structure" for a description of a camera data structure.

Q3Camera_SetData

You can use the Q3Camera_SetData function to set the basic data associated with a camera.

TQ3Status Q3Camera_SetData (
                     TQ3CameraObject camera,
                     const TQ3CameraData *cameraData);
camera
A camera object.
cameraData
A pointer to a camera data structure.

DESCRIPTION

The Q3Camera_SetData function sets the data associated with the camera specified by the camera parameter to the data specified by the cameraData parameter.

Q3Camera_GetPlacement

You can use the Q3Camera_GetPlacement function to get the current placement of a camera.

TQ3Status Q3Camera_GetPlacement (
                     TQ3CameraObject camera,
                     TQ3CameraPlacement *placement);
camera
A camera object.
placement
On exit, a pointer to a camera placement structure.

DESCRIPTION

The Q3Camera_GetPlacement function returns, in the placement parameter, a pointer to a camera placement structure that describes the current placement of the camera specified by the camera parameter.

Q3Camera_SetPlacement

You can use the Q3Camera_SetPlacement function to set the placement of a camera.

TQ3Status Q3Camera_SetPlacement (
                     TQ3CameraObject camera,
                     const TQ3CameraPlacement *placement);
camera
A camera object.
placement
A pointer to a camera placement structure.

DESCRIPTION

The Q3Camera_SetPlacement function sets the placement of the camera specified by the camera parameter to the position specified by the placement parameter.

Q3Camera_GetRange

You can use the Q3Camera_GetRange function to get the current range of a camera.

TQ3Status Q3Camera_GetRange (
                     TQ3CameraObject camera,
                     TQ3CameraRange *range);
camera
A camera object.
range
On exit, a pointer to a camera range structure.

DESCRIPTION

The Q3Camera_GetRange function returns, in the range parameter, a pointer to a camera range structure that describes the current range of the camera specified by the camera parameter.

Q3Camera_SetRange

You can use the Q3Camera_SetRange function to set the range of a camera.

TQ3Status Q3Camera_SetRange (
                     TQ3CameraObject camera,
                     const TQ3CameraRange *range);
camera
A camera object.
range
A pointer to a camera range structure.

DESCRIPTION

The Q3Camera_SetRange function sets the range of the camera specified by the camera parameter to the range specified by the range parameter.

Q3Camera_GetViewPort

You can use the Q3Camera_GetViewPort function to get the current view port of a camera.

TQ3Status Q3Camera_GetViewPort (
                     TQ3CameraObject camera,
                     TQ3CameraViewPort *viewPort);
camera
A camera object.
viewPort
On exit, a pointer to a camera view port structure.

DESCRIPTION

The Q3Camera_GetViewPort function returns, in the viewPort parameter, a pointer to a camera view port structure that describes the current view port of the camera specified by the camera parameter.

Q3Camera_SetViewPort

You can use the Q3Camera_SetViewPort function to set the view port of a camera.

TQ3Status Q3Camera_SetViewPort (
                     TQ3CameraObject camera,
                     const TQ3CameraViewPort *viewPort);
camera
A camera object.
viewPort
A pointer to a camera view port structure.

DESCRIPTION

The Q3Camera_SetViewPort function sets the view port of the camera specified by the camera parameter to the view port specified by the viewPort parameter.

Q3Camera_GetWorldToView

You can use the Q3Camera_GetWorldToView function to get the current world-to-view space transform.

TQ3Status Q3Camera_GetWorldToView (
                     TQ3CameraObject camera,
                     TQ3Matrix4x4 *worldToView);
camera
A camera object.
worldToView
On output, a pointer to a 4-by-4 matrix.

DESCRIPTION

The Q3Camera_GetWorldToView function returns, in the worldToView parameter, a pointer to a 4-by-4 matrix that describes the current world-to-view space transform defined by the camera specified by the camera parameter. The world-to-view space transform is defined only by the placement of the camera; it establishes the camera location as the origin of the view space, with the view vector (that is, the vector from the camera's eye toward the point of interest) placed along the -z axis and the up vector placed along the y axis.

Q3Camera_GetViewToFrustum

You can use the Q3Camera_GetViewToFrustum function to get the current view-to-frustum transform.

TQ3Status Q3Camera_GetViewToFrustum (
                     TQ3CameraObject camera,
                     TQ3Matrix4x4 *viewToFrustum);
camera
A camera object.
viewToFrustum
On output, a pointer to a 4-by-4 matrix.

DESCRIPTION

The Q3Camera_GetViewToFrustum function returns, in the viewToFrustum parameter, a pointer to a 4-by-4 matrix that describes the current view-to-frustum transform defined by the camera specified by the camera parameter.

Q3Camera_GetWorldToFrustum

You can use the Q3Camera_GetWorldToFrustum function to get the current world-to-frustum transform.

TQ3Status Q3Camera_GetWorldToFrustum (
                     TQ3CameraObject camera,
                     TQ3Matrix4x4 *worldToFrustum);
camera
A camera object.
worldToFrustum
On output, a pointer to a 4-by-4 matrix.

DESCRIPTION

The Q3Camera_GetWorldToFrustum function returns, in the worldToFrustum parameter, a pointer to a 4-by-4 matrix that describes the current world-to-frustum transform defined by the camera specified by the camera parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |